import matplotlib.markers
import matplotlib.pyplot as plt
import numpy as np

# 实心圆标记
def fun1():
    ypoints = np.array([1, 3, 4, 5, 8, 9, 6, 1, 3, 4, 5, 2, 4])

    plt.plot(ypoints, marker='o')
    plt.show()

# 下箭头标记
def fun2():
    plt.plot([1, 2, 3], marker=matplotlib.markers.CARETDOWNBASE)
    plt.show()

# fmt参数：标记、线条样式、颜色 fmt = '[marker][line][color]'
def fun3():
    ypoints = np.array([6, 2, 13, 10])

    plt.plot(ypoints, 'o:r')
    plt.show()

# 标记大小与颜色 ms->标记的大小, mfc->标记内部的颜色, mec->标记边框的颜色
def fun4():
    ypoint = np.array([6, 2, 13, 10])

    plt.plot(ypoint, marker='o', ms=20, mec='r', mfc='#4CAF50')
    plt.show()

if __name__ == '__main__':
    fun4()